
<template>
	<div>
		
		<a-row>
			<a-col span="4">
                <a-checkbox v-model:checked="props.componentConfig.quitFlag">退出浏览器</a-checkbox>
			</a-col>
			<a-col span="4">
                <a-checkbox v-model:checked="props.componentConfig.closeFlag">关闭浏览器</a-checkbox>
			</a-col>
            <a-col span="4">
                <a-checkbox v-model:checked="props.componentConfig.fullScreenFlag">全屏浏览器</a-checkbox>
			</a-col>
            <a-col span="4">
                <a-checkbox v-model:checked="props.componentConfig.maxWindowFlag">最大化浏览器</a-checkbox>
			</a-col>
            <a-col span="4">
                <a-checkbox v-model:checked="props.componentConfig.minWindowFlag">最小化浏览器</a-checkbox>
			</a-col>
		</a-row>
      
	</div>
</template>

<script setup>
import { onMounted, ref, watch, toRaw, inject, getCurrentInstance } from 'vue'
import { Message, Radio, Row, Switch } from 'view-ui-plus'
import processVersionContentApi from '@/api/process/processVersionContentApi'

const props = defineProps(['componentConfig', 'nodeId', 'id', 'frontFile'])

const defaultConfig = () => {
	return {
		quitFlag:false,
        closeFlag:false,
        maxWindowFlag:false,
        minWindowFlag:false,
        fullScreenFlag:false,
	}
}

onMounted(async () => {
	if (!hasProperties(props.componentConfig)) {
		const c = defaultConfig()
		props.componentConfig.quitFlag = c.quitFlag
        props.componentConfig.closeFlag = c.closeFlag
        props.componentConfig.maxWindowFlag = c.maxWindowFlag
        props.componentConfig.minWindowFlag = c.minWindowFlag
        props.componentConfig.fullScreenFlag = c.fullScreenFlag

	}
})

const hasProperties = (obj) => {
	if (!obj) {
		return false
	}

	return JSON.stringify(obj) != '{}'
}
</script>

<style scoped></style>
